package com.bite.deom3;

public class People implements Cloneable{

    private String name;
    private Money m = new Money();

    public People(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Money getM() {
        return m;
    }

    public void setM(Money m) {
        this.m = m;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {

//        return super.clone();
        People tem = (People) super.clone();
        tem.setM((Money) this.getM().clone());
        return tem;
    }
}
